package org.zfes.snowier.common.monitor.biz.dto;

import java.io.Serializable;
import java.util.Date;

import org.zfes.snowier.common.monitor.biz.model.MysqlMonitorEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import net.bytebuddy.implementation.bind.annotation.IgnoreForBinding;
public class MysqlMonitorDataDto implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

    private Integer id;
	
	private String host;
	private Integer port;
	
	
	private String instanceKey;
	private String groupKey;
	private Date date;
	private String dateStr;
	private Integer tps;
	private Integer qps;
	private Integer Questions;
	private Integer Com_select;
	private Integer Com_insert;
	private Integer Com_delete;
	private Integer Com_update;
	private Integer Com_begin;
	private Integer Com_commit;
	private Integer Com_rollback;
	private Integer Max_used_connections;
	private Integer Threads_connected;
	private Integer Connections;
	private Integer Threads_running;
	private Integer Bytes_received;
	private Integer Bytes_sent;
	private Integer Open_tables;
	private Integer Uptime;
	
	public MysqlMonitorEntity  toEntity() {
		MysqlMonitorEntity entity=new MysqlMonitorEntity();
		entity.setId(this.getId());
    	entity.setHost(this.getHost());
    	entity.setPort(this.getPort()) ;
    	entity.setInstanceKey(this.getInstanceKey());
    	entity.setGroupKey(this.getGroupKey()) ;
    	entity.setDate(this.getDate()) ;
    	entity.setTps(this.getTps()) ;
    	entity.setQps(this.getQps()) ;
    	entity.setQuestions(this.getQuestions());
    	entity.setComSelect(this.getCom_select()) ;
    	entity.setComInsert(this.getCom_insert());
    	entity.setComDelete(this.getCom_delete()) ;
    	entity.setComUpdate(this.getCom_update()) ;
    	entity.setComBegin(this.getCom_begin()) ;
    	entity.setComCommit(this.getCom_commit());
    	entity.setComRollback(this.getCom_rollback());
    	entity.setMaxUsedConnections(this.getMax_used_connections());
    	entity.setThreadsConnected(this.getThreads_connected()) ;
    	entity.setConnections(this.getConnections()) ;
    	entity.setThreadsRunning(this.getThreads_running()) ;
    	entity.setBytesReceived(this.getBytes_received());
    	entity.setBytesSent(this.getBytes_sent()) ;
    	entity.setOpenTables(this.getOpen_tables());
    	entity.setUptime(this.getUptime());
    	return entity;
	}
	
	public String getInstanceKey() {
		return instanceKey;
	}
	public MysqlMonitorDataDto setInstanceKey(String instanceKey) {
		this.instanceKey = instanceKey;
		return this;
	}
	public Integer getQuestions() {
		return Questions;
	}
	public MysqlMonitorDataDto setQuestions(Integer questions) {
		Questions = questions;
		return this;
	}
	public Integer getCom_select() {
		return Com_select;
	}
	public MysqlMonitorDataDto setCom_select(Integer com_select) {
		Com_select = com_select;
		return this;
	}
	public Integer getCom_insert() {
		return Com_insert;
	}
	public MysqlMonitorDataDto setCom_insert(Integer com_insert) {
		Com_insert = com_insert;
		return this;
	}
	public Integer getCom_delete() {
		return Com_delete;
	}
	public MysqlMonitorDataDto setCom_delete(Integer com_delete) {
		Com_delete = com_delete;
		return this;
	}
	public Integer getCom_update() {
		return Com_update;
	}
	public MysqlMonitorDataDto setCom_update(Integer com_update) {
		Com_update = com_update;
		return this;
	}
	public Integer getCom_begin() {
		return Com_begin;
	}
	public MysqlMonitorDataDto setCom_begin(Integer com_begin) {
		Com_begin = com_begin;
		return this;
	}
	public Integer getCom_commit() {
		return Com_commit;
	}
	public MysqlMonitorDataDto setCom_commit(Integer com_commit) {
		Com_commit = com_commit;
		return this;
	}
	public Integer getCom_rollback() {
		return Com_rollback;
	}
	public MysqlMonitorDataDto setCom_rollback(Integer com_rollback) {
		Com_rollback = com_rollback;
		return this;
	}
	public Integer getMax_used_connections() {
		return Max_used_connections;
	}
	public MysqlMonitorDataDto setMax_used_connections(Integer max_used_connections) {
		Max_used_connections = max_used_connections;
		return this;
	}
	public Integer getThreads_connected() {
		return Threads_connected;
	}
	public MysqlMonitorDataDto setThreads_connected(Integer threads_connected) {
		Threads_connected = threads_connected;
		return this;
	}
	public Integer getConnections() {
		return Connections;
	}
	public MysqlMonitorDataDto setConnections(Integer connections) {
		Connections = connections;
		return this;
	}
	public Integer getThreads_running() {
		return Threads_running;
	}
	public MysqlMonitorDataDto setThreads_running(Integer threads_running) {
		Threads_running = threads_running;
		return this;
	}
	public Integer getBytes_received() {
		return Bytes_received;
	}
	public MysqlMonitorDataDto setBytes_received(Integer bytes_received) {
		Bytes_received = bytes_received;
		return this;
	}
	public Integer getBytes_sent() {
		return Bytes_sent;
	}
	public MysqlMonitorDataDto setBytes_sent(Integer bytes_sent) {
		Bytes_sent = bytes_sent;
		return this;
	}
	public Integer getOpen_tables() {
		return Open_tables;
	}
	public MysqlMonitorDataDto setOpen_tables(Integer open_tables) {
		Open_tables = open_tables;
		return this;
	}
	public Integer getUptime() {
		return Uptime;
	}
	public MysqlMonitorDataDto setUptime(Integer uptime) {
		Uptime = uptime;
		return this;
	}
	
	public Date getDate() {
		return date;
	}
	public MysqlMonitorDataDto setDate(Date date) {
		this.date = date;
		return this;
	}
	
	
	
	public Integer getTps() {
		return tps;
	}

	public void setTps(Integer tps) {
		this.tps = tps;
	}

	public Integer getQps() {
		return qps;
	}

	public void setQps(Integer qps) {
		this.qps = qps;
	}

	public String getGroupKey() {
		return groupKey;
	}
	public void setGroupKey(String groupKey) {
		this.groupKey = groupKey;
	}
	public String getHost() {
		return host;
	}
	public void setHost(String host) {
		this.host = host;
	}
	public Integer getPort() {
		return port;
	}
	public void setPort(Integer port) {
		this.port = port;
	}
	
	
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getDateStr() {
		return dateStr;
	}
	public void setDateStr(String dateStr) {
		this.dateStr = dateStr;
	}
	@Override
	public String toString() {
		return "MysqlMonitorData [host=" + host + ", port=" + port + ", instanceKey=" + instanceKey + ", groupKey="
				+ groupKey + ", date=" + date + ", tps=" + tps + ", qps=" + qps + ", Questions=" + Questions
				+ ", Com_select=" + Com_select + ", Com_insert=" + Com_insert + ", Com_delete=" + Com_delete
				+ ", Com_update=" + Com_update + ", Com_begin=" + Com_begin + ", Com_commit=" + Com_commit
				+ ", Com_rollback=" + Com_rollback + ", Max_used_connections=" + Max_used_connections
				+ ", Threads_connected=" + Threads_connected + ", Connections=" + Connections + ", Threads_running="
				+ Threads_running + ", Bytes_received=" + Bytes_received + ", Bytes_sent=" + Bytes_sent
				+ ", Open_tables=" + Open_tables + ", Uptime=" + Uptime + "]";
	}


	





}
